package com.cskaoyan.wx.controller;

import com.cskaoyan.wx.bean.vo.CommentVoCL.CommentCountVo;
import com.cskaoyan.wx.service.WxCommentService;
import com.cskaoyan.vo.BaseRespVo;
import com.cskaoyan.wx.bean.vo.CommentVoCL.CommentData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 功能:评论
 * 作者:chen11
 */
@RestController
public class WxCommentController {

    @Autowired
    WxCommentService commentService;

    @RequestMapping("wx/comment/list")
    public BaseRespVo SelectCommentList(Integer valueId, Integer type, Integer size,Integer page, Integer showType){
        CommentData data = commentService.SelectCommentList(valueId, type, size,page, showType);
        return BaseRespVo.ok(data);
    }

    @RequestMapping("wx/comment/count")
    public BaseRespVo CountComment(Integer valueId,Integer type){
        CommentCountVo commentCountVo= commentService.CountComment(valueId,type);
        return BaseRespVo.ok(commentCountVo);
    }
}
